/**
 * 小程序配置文件
 */

var server = require("./server.js");
var project = require("./project.js")

// 此处主机域名修改成腾讯云解决方案分配的域名
var host = server.host;

var url = `https://${host}/wxmaAuth`

var config = {
    // 小程序名称f
    appname: 'daka',
    //七牛的url前缀
    qiniuURLPrefix: `http://${server.qiniuDomain}`,

    appid: `${project.appid}`,
    // 下面的地址配合云端 Demo 工作
    service: {
      host,
      //获取信息
      obtainSelfInfo: `${url}/sensitive/user/obtainSelfInfo`,
      //绑定工号信息
      bingJobNum: `https://${host}/wxma/bingJobNum`,
      // 获取token
      obtainPictureUploadToken: `https://${host}/qiniu/obtainFileUploadToken`,
      // websoket
      match: `wss://${host}/websocket/match`,
      // 登录地址，用于建立会话
      loginUrl: `https://${host}/wxma/login`,
      // 获取班级信息
      obtainClassInfos: `${url}/sensitive/class/obtainClassInfos`,
      //  获取班级打卡
      obtainCardsForClass: `${url}/sensitive/card/obtainCardsForClass`,
      // 获取班级成员
      obtainClassMembers: `${url}/sensitive/class/obtainClassMembers`,
      //点赞
      likeCard: `${url}/sensitive/card/likeCard`,
      //取消点赞
      unlikeCard: `${url}/sensitive/card/unlikeCard`,
      // 语音识别
      recogniseCardContent: `${url}/sensitive/card/recogniseCardContent`,
      // 打卡详情 
      obtainCardDetail: `${url}/sensitive/card/obtainCardDetail`,
      // 创建回复
      createCardReply: `${url}/sensitive/card/createCardReply`,
      // 获取公告列表
      obtainNotices: `${url}/sensitive/class/obtainNotices`,
      // 获取用户在某班打卡列表
      obtainCardsForUser: `${url}/sensitive/card/obtainCardsForUser`,
      // 发布班级公告
      newNotice: `${url}/sensitive/class/newNotice`,
      // 获取班级公告
      obtainNoticesUnreaded: `${url}/sensitive/class/obtainNoticesUnreaded`,
      // 查看指定公告详情
      readNotice: `${url}/sensitive/class/readNotice`,
      // 创建群组
      newGroup: `${url}/sensitive/class/newGroup`,
      // 查看群组列表
      obtainGroups: `${url}/sensitive/class/obtainGroups`,
      // 修改群组
      modifyGroup: `${url}/sensitive/class/modifyGroup`,
      // 删除群组
      removeGroups: `${url}/sensitive/class/removeGroups`,
      //指定群组成员
      assignGroupMembers: `${url}/sensitive/class/assignGroupMembers`,
      //获取群组成员
      obtainGroupMembers: `${url}/sensitive/class/obtainGroupMembers`,
      //打卡
      punchCard: `${url}/sensitive/card/punchCard`,
      //修改打卡
      modifyCard: `${url}/sensitive/card/modifyCard`
    }
};

module.exports = config;